﻿var bepop = bepop || {};

bepop.picasa = bepop.picasa || {};

bepop.picasa.downloadImagesAsync = function (user, album, callback) {
	if (user == null || typeof user != "string" ||
		album == null || typeof album != "string" ||
			callback == null || typeof callback != "function") throw new Error("bepop.picasa.downloadImagesAsync: Invalid param arg.");
	$.picasa.images(user, album, function (images) {
		$.each(images, function (j, image) {
			callback(image);
		});
	});
//		$.each(albums, function (i, album) {
//			album.images(function (images) {
//				$.each(images, function (j, image) {
//					callback(image);
//				});
//			});
//		});
}